package com.zyuan.lawyerport.view.cModule.adapter;


import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.zyuan.lawyerport.R;
import com.zyuan.lawyerport.view.aModule.Bean.ConsultingMsgBean;
import com.zyuan.lawyerport.view.cModule.bean.OrderBean;

import java.util.List;

/**
 * 作者 ：RAN
 * 时间 ：2019/10/16 11:38
 * 类名 ：ConsultingMsgAdapter
 * 描述 ：咨询留言适配器
 * 版本 ：1.0
 */
public class OrderAdapter extends BaseQuickAdapter<OrderBean, BaseViewHolder> {


    public OrderAdapter(List<OrderBean> data) {
        super(R.layout.item_order, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, OrderBean item) {
//        helper.setText(R.id.,item.getName());
        if (item.getType() == 0) {
            helper.setBackgroundRes(R.id.rl_bg, R.mipmap.ic_item_ongoing_order);
        } else if (item.getType() == 1) {
            helper.setBackgroundRes(R.id.rl_bg, R.mipmap.ic_item_completed_order);
        } else if (item.getType() == 2) {
            helper.setBackgroundRes(R.id.rl_bg, R.mipmap.ic_item_evaluation_order);
        }
    }
}
